import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-01-01
 * Time:21:23
 */
public class Test {
    public static void main(String[] args) {

        int a=0;
        Scanner scanner=new Scanner(System.in);

        do {
            menu();
            a=scanner.nextInt();
            if(a==1){
                guess();
            }
        }while(a>0);
    }
    public static void menu(){
        System.out.println("******************");
        System.out.println("**1.begin 0.exit**");
        System.out.println("******************");
    }
    public static void guess(){
        Scanner scanner=new Scanner(System.in);
        Random randon=new Random();
        int x= randon.nextInt(101);
//        System.out.println(x);
        int n=101;
        while(n!=x){
            System.out.print("请输入0-100的数字：");
            n=scanner.nextInt();
            if(n>x){
                System.out.println("猜大了");
            }
            else if(n<x){
                System.out.println("猜小了");
            }

        }
        System.out.println("猜对了");
    }
}
